import App from './App'
import * as system from '@/common/system.js'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'

Vue.config.productionTip = false
Vue.prototype.$System = system
App.mpType = 'app'
const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
// 引入 uView UI
import uView from './uni_modules/vk-uview-ui'
import {
	createSSRApp
} from 'vue'
import * as Pinia from 'pinia'
import {
	createUnistorage
} from "./uni_modules/pinia-plugin-unistorage";
export function createApp() {
	const app = createSSRApp(App)
	const pinia = Pinia.createPinia()
	pinia.use(createUnistorage());
	app.use(pinia)
	// 使用 uView UI
	app.use(uView)
	app.config.globalProperties.$System = system

	return {
		app,
		Pinia
	}
}
// #endif